Don't export gtk_get_option_group
authorMatthias Clasen <mclasen@redhat.com>
Tue, 27 Dec 2016 23:45:53 +0000 (18:45 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 19 Jan 2017 18:21:12 +0000 (13:21 -0500)
We want to get rid of commandline option handling in GTK+.
This is a step in that direction.

gtk/gtk-launch.c
gtk/gtkapplication.c
gtk/gtkmain.c
gtk/gtkmain.h

index 692fb941e592aa1e20f0b47d485ca196fc40646d..bf84ad614a1db834bccc1703b1c3e2c8b6af6c25 100644 (file)
@@ -79,8 +79,6 @@ main (int argc, char *argv[])
               "optionally passing one or more URIs as arguments.");
   g_option_context_set_summary (context, summary);
   g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
-  g_option_context_add_group (context, gtk_get_option_group (FALSE));
-
   g_option_context_parse (context, &argc, &argv, &error);
 
   g_option_context_free (context);
index ea3eba30cd9e05865aaff6aecdb8b6155536e43a..a1b2271cab6a8ba61132df337ebddab018c23f95 100644 (file)
@@ -327,8 +327,6 @@ gtk_application_local_command_line (GApplication   *application,
                                     gchar        ***arguments,
                                     gint           *exit_status)
 {
-  g_application_add_option_group (application, gtk_get_option_group (FALSE));
-
   return G_APPLICATION_CLASS (gtk_application_parent_class)->local_command_line (application, arguments, exit_status);
 }
 
index 49813944ba692c622e72d6b5bfffd3e9126e2c08..0a619202f96187506e2d2f1214894e7218abcc21 100644 (file)
@@ -864,24 +864,7 @@ gtk_simulate_touchscreen (void)
   return test_touchscreen > 0 || (gtk_get_debug_flags () & GTK_DEBUG_TOUCHSCREEN) != 0;
  }
 
-/**
- * gtk_get_option_group:
- * @open_default_display: whether to open the default display
- *     when parsing the commandline arguments
- *
- * Returns a #GOptionGroup for the commandline arguments recognized
- * by GTK+ and GDK.
- *
- * You should add this group to your #GOptionContext
- * with g_option_context_add_group(), if you are using
- * g_option_context_parse() to parse your commandline arguments.
- *
- * Returns: (transfer full): a #GOptionGroup for the commandline
- *     arguments recognized by GTK+
- *
- * Since: 2.6
- */
-GOptionGroup *
+static GOptionGroup *
 gtk_get_option_group (gboolean open_default_display)
 {
   GOptionGroup *group;
index 79398b2a2ba940ab8fd4b96174592dd06c367b62..33635bf7412cd7742b0f3edbd1e40b340fc5891e 100644 (file)
@@ -80,9 +80,6 @@ GDK_AVAILABLE_IN_ALL
 gboolean gtk_init_check           (int    *argc,
                                    char ***argv);
 
-GDK_AVAILABLE_IN_ALL
-GOptionGroup *gtk_get_option_group (gboolean open_default_display);
-
 #ifdef G_OS_WIN32
 
 /* Variants that are used to check for correct struct packing